A compiler is a computer program for translating a source code written in a human-understandable programming language as e.g. C; C++, FORTRAN, etc. into machine-readable code. In most cases, a compiler provides a complete translation of a program in source code, which then may be run on a computer system. Different computer systems, in particular computer systems with different types of CPU (central processing unit), usually have different sets of machine-readable instructions and data structures. As an example, Intel x86-based computer systems at machine level tend to store values larger than 255 in a different bytewise order than e.g. IBM Power-based computer systems. Thus, for specific machines a compiler has to provide a specific machine-readable code. In addition, the operating system running on a computer system may influence the compiled code intended to run on a computer as well. A compiler easily reconfigurable to create a compiler for a new target-architecture respectively a compiler able to produce code for different computer systems respectively operating systems may be called retargetable. A retargetable compiler may be used to compile on one computer system a program which is supposed to run on a system with different architecture, which is called cross-compiling. A well-known retargetable compiler respectively compiler collection is the GCC (Gnu Compiler Collection) developed by the GNU project.
Modern compilers often provide optimization features, which may improve a program's performance significantly. Such optimizations can be performed on different levels and in different ways. One optimization approach deals with trying to optimize the use of registers during the runtime of a program. Registers may be provided independently of normal memory, e.g. random access memory (RAM), e.g. on-chip with a CPU or a memory management unit (MMU). Registers are usually much faster to access for reading or writing data than RAM, so that it is preferable to use registers for data transfer and manipulation as much as possible. However, the differences in registers of different architectures make it difficult to effectively adopt generalized optimization strategies for different target-platforms.
Examples for register allocation methods for compiler optimization are described in “Graph-Coloring Register Allocation for Processors with Multi-Register Operands” by Brian Nickerson in Proceedings of the ACM SIGPLAN'90 Conference on Programming Language Design and Implementation, White Plains, N.Y., Jun. 20-22, 1990 and in “Precise Register Allocation for Irregular Architectures” by Timothy Kong and Kent D. Wllken, presented at the 31st International Microarchitecture Conference, December 1998.